/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author dvasquez
 */
@Embeddable
public class MedicionesDCAsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "numero")
    private int numero;
    @Basic(optional = false)
    @Column(name = "ID")
    private int id;

    public MedicionesDCAsPK() {
    }

    public MedicionesDCAsPK(int numero, int id) {
        this.numero = numero;
        this.id = id;
    }

    public int getNumero() {
        return numero;
    }

    public void setNumero(int numero) {
        this.numero = numero;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) numero;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MedicionesDCAsPK)) {
            return false;
        }
        MedicionesDCAsPK other = (MedicionesDCAsPK) object;
        if (this.numero != other.numero) {
            return false;
        }
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.MedicionesDCAsPK[numero=" + numero + ", id=" + id + "]";
    }

}
